package com.xcity.pomelo.push;

import com.xcity.game.common.LogCause;
import com.xcity.pomelo.PomeloRoute;

import naga.x.net.impl.pomelo.PomeloMessage;
import naga.x.net.impl.pomelo.PomeloPacket;
import naga.x.net.impl.pomelo.protocol.Message;

@PomeloMessage(type = Message.Type.PUSH, route = PomeloRoute.PUSH_SYNC)
public abstract class SyncPush extends PomeloPacket {

	protected short id; // 需同步的属性id
	protected LogCause cause; // 同步原因
	
	public static final short SYNC_GOLD = 1; // 同步现金
	public static final short SYNC_STONE = 2; // 同步钻石
	public static final short SYNC_FIXED_ASSETS = 3; // 同步固资
	public static final short SYNC_LEVEL = 4; // 同步等级
	public static final short SYNC_EXP = 5; // 同步当前经验
	public static final short SYNC_EXP_MAX = 6; // 同步经验槽最大值（升级时会同步）
	public static final short SYNC_RANKING = 7; // 同步排行榜排名
	public static final short SYNC_RISK = 8; // 同步风险值
	@Deprecated
	public static final short SYNC_BUILD_BLOCK = 9; // 同步当前建筑位置
	@Deprecated
	public static final short SYNC_NEXT_GRADE_BUILD_BLOCK = 10; // 同步下一档次的建筑位置
	@Deprecated
	public static final short SYNC_NEXT_GRADE_BUILD_BLOCK_NEED_LEVEL = 11; // 同步下一档次的建筑位置所需等级
	public static final short SYNC_BUILD_SPEED = 12; // 同步点击建造速度
	public static final short SYNC_BUILD_INCOME_ADDED = 13; // 同步建筑加成收入(世界事件影响)
	public static final short SYNC_ITEM_COUNT = 14; // 同步背包已存在的物品的数量
	public static final short SYNC_ITEM_ADDED = 15; // 同步背包新增物品
	public static final short SYNC_ITEM_REMOVED = 16; // 同步背包物品移除
	public static final short SYNC_STRENGTH = 17; // 同步体力
	public static final short SYNC_WATCHDOG = 18; // 同步看门狗(value=0 移除看门狗; value=宠物类型@see pets.xlsx)
	public static final short SYNC_NAME = 19; // 同步角色名
	public static final short SYNC_BUILD = 20; // 同步某个建筑信息
	public static final short SYNC_PET = 21; // 同步某个宠物信息
	@Deprecated
	public static final short SYNC_ATTR = 22; // 同步角色某些属性
	public static final short SYNC_EMPLOYEE = 23; // 同步员工
	public static final short SYNC_CHARM = 24; // 同步魅力值
	public static final short SYNC_MAX_STRENGTH = 25; // 同步体力上限
	public static final short SYNC_TASK = 26; // 同步任务状态
	public static final short SYNC_VIP = 27; // 同步vip等级
	public static final short SYNC_ICON = 28; // 同步角色头像
	public static final short SYNC_PET_SPIRIT = 29; // 同步宠物精神值(目前只同步工作状态中的宠物)
	public static final short SYNC_EMPLOYEE_HP = 30; // 同步员工血量
	public static final short SYNC_EMPLOYEE_ENERGY = 31; // 同步员工精力
	public static final short SYNC_EQUIP_ADDED = 32; // 同步装备列表新增装备
	public static final short SYNC_EQUIP_REMOVED = 33; // 同步装备列表移除装备
	public static final short SYNC_EQUIP_ATTRS = 34; // 同步装备某些属性
	public static final short SYNC_COMBAT_POWER = 35; // 同步战斗力
	public static final short SYNC_ONLINE_TIME = 36; // 同步本次登录后累计在线时长（秒）（QQ玩吧渠道用户，每90分钟推送一次）
	public static final short SYNC_SHIELD = 37; // 同步护盾数量
	public static final short SYNC_VIGOUR = 38; // 同步玩家精力
	public static final short SYNC_EMPLOYEE_REMOVED = 39; // 同步移除员工
	public static final short SYNC_STAGE_STARS = 40; // 同步副本星数
	public static final short SYNC_PEAK_COIN = 41; // 同步巅峰币
	public static final short SYNC_PEAK_ROAD_UNIT_HP = 42; // 同步爬塔副本中的员工、玩家血量（默认满血）
	public static final short SYNC_BOND = 43;//同步债券(30天签到中的豪华签到产出的代币)
	public static final short SYNC_HONOR = 44; // 同步荣誉
	public static final short SYNC_CONQUESTS_COUNT = 45; // 同步占领建筑数量
	public static final short SYNC_EMPLOYEE_COMBAT_POWER = 46; // 同步员工战斗力
	public static final short SYNC_SKILL_POINTS = 47; // 同步技能点数
	public static final short SYNC_COMBAT_ATTRIBUTES = 48; // 同步战斗属性（二维属性）
	public static final short SYNC_EMPLOYEE_STATE = 49; // 同步员工状态
	public static final short SYNC_KING_COIN = 50; // 同步王者币
	public static final short SYNC_EMPLOYEE_UNTAKE = 51; // 员工取消驻守矿点
	public static final short SYNC_BUILD_STATE = 52; // 同步建筑状态
	public static final short SYNC_GUILD_INFO = 53; // 同步公会ID(在解散或被踢后) 0表示没公会
	public static final short SYNC_GUILD_SCORE = 54; //同步公会积分
	public static final short SYNC_GUILD_UI_STATE = 55; //同步UI状态 1表示公会信息需要刷新  1<<1表示公会成员需要刷新 1<<2表示公会申请列表需要刷新

	public SyncPush(short id) {
		this(id, null);
	}
	
	public SyncPush(short id, LogCause cause) {
		this.id = id;
		this.cause = cause;
	}
	
	public short getId() {
		return id;
	}

	public void setId(short id) {
		this.id = id;
	}

	public LogCause getCause() {
		return cause;
	}

	public void setCause(LogCause cause) {
		this.cause = cause;
	}
	
}
